package com.myphoto.business.photo.service;

import com.myphoto.base.mybatis.photo.entity.PhotoEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface PhotoService {

    /**
    * @description 查询相片列表
    * @author 方安伦
    * @date 2022/4/12 17:05
    * @return List<PhotoEntity>
     **/
    List<PhotoEntity> loadPhotoList() throws Exception;

    /**
    * @description 上传相片
    * @author 方安伦
    * @date 2022/4/12 17:19
    * @param lastModified
    * @param file
     **/
    void uploadPhoto(String lastModified,MultipartFile file) throws Exception;

    /**
    * @description 检查相片是否已经存在
    * @author 方安伦
    * @date 2022/4/12 17:28
    * @param filename
    * @return boolean
     **/
    boolean checkFileIsExist(String filename) throws Exception;

    /**
    * @description 检查相片信息是否已经存在
    * @author 方安伦
    * @date 2022/4/14 11:11
    * @param filename
    * @return boolean
     **/
    boolean checkFileInfoIsExist(String filename) throws Exception;

    /**
    * @description 清除冗余图片信息
    * @author 方安伦
    * @date 2022/4/22 9:44
     **/
    void clearErrorPicinfo() throws Exception;
}
